<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../layui/jquery-3.2.1.min.js"></script>
    <script src="../layui/layui.js"></script>
    <script src="../layui/jquery.query.js"></script>
    <script src="js/purchaseInfo.js"></script>
    <link href="../layui/css/layui.css" rel="stylesheet">
    <link href="css/purchaseInfo.css" rel="stylesheet">
</head>
<body>
    <div class="layui-container">
        <h1 style="margin-left: 450px">采购信息查询</h1>
        <table class="layui-table">
            <thead><tr><th>供应商名称</th><th>采购员</th><th>采购时间</th><th>查看采购详情</th></tr></thead>
            <tbody id="tableData"></tbody>
        </table>
        <div id="cutPageDiv"></div>
        <div>
            <form class="layui-form" style="width: 400px;height: 400px;margin-left: 600px" id="formData">
                <fieldset>
                    <legend>查询采购信息</legend>

                    <div class="layui-form-item">
                        <label class="layui-form-label">供应商</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" required  lay-verify="required" placeholder="请输入供应商" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">起始日期</label>
                        <div class="layui-input-block">
                            <input type="date" name="startDate" required  lay-verify="required" placeholder="请输入起始日期" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">结束日期</label>
                        <div class="layui-input-block">
                            <input type="date" name="endDate" required  lay-verify="required" placeholder="请输入结束日期" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div id="findDiv">
                        <a href="javascript:findByItem(1)" class="layui-btn layui-btn-normal"><i class="layui-icon layui-icon-search"></i>查询</a>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>

    <!--查看采购详情弹出层-->
    <div style="display: none" id="findByCompanyIdDiv" class="layui-container">
        <form id="purchaseForm">
            <h1>采购信息详情</h1>
            <div class="layui-col-md6">
                供应商名称：<span id="name"></span>
            </div>
            <div class="layui-col-md6">
                采购员：<span id="purchaserName"></span>
            </div>
            <div>
                采购时间：<span id="purchaseDate"></span>
            </div>
            <span>采购物品明细</span>
            <table class="layui-table">
                <thead><tr><th>商品名称</th><th>厂家</th><th>建议采购价</th><th>建议零售价</th><th>采购数量</th></tr></thead>
                <tbody id="purchaseTableDiv"></tbody>
            </table>
            <div id="sureDiv">
                <a class="layui-btn layui-btn-normal" href="javascript:sure()">确定</a>
            </div>
        </form>
    </div>
</body>
</html>